{% extends 'base.html' %}
{% load viewflow %}

{% block nav_parcels_cls %}class="active"{% endblock %}

{% block content %}
<h2 class="center">Parcel #{{ process.pk }}</h2>
<div class="row">
  <div class="col s12 m6 l5 offset-m3 offset-l2">
    <table>
      <thead>
        <tr>
          <td>#</td>
          <td>Description</td>
          <td>Owner</td>
          <td>Status</td>
        </tr>
      </thead>
      <tbody>
        {% for task in task_list %}
        {% flowurl task user=request.user as task_url %}
        <tr>
          <td>
            {% if task_url %}<a href="{{ task_url}}">{{ task.pk }}</a>{% else %}{{ task.pk }}{% endif %}
          </td>
          <td>{{ task.summary|default:task.flow_task }}</td>
          <td>{{ task.owner }}</td>
          <td>{{ task.status }}</td>
        </tr>
        {% endfor %}
      </tbody>
    </table>
  </div>
  <div class="col s12 m6 l4 offset-m3 offset-l1">
    {% include_process_data process %}
  </div>
</div>
{% endblock %}
